_require local "../../basis.smi"
_require local "../../thread/main/Myth.smi"

structure ForeachCommon =
struct
  type 'a context =
      {
        value : int -> 'a,
        newValue : int -> 'a,
        size : int
      }
  type 'a iterator = int * 'a context -> 'a
  type 'a pred = int * 'a context -> bool
  val cutOff : int ref
  val foreach
      : {from : 'a array, iterator : 'a iterator, pred : 'a pred} -> 'a array
end
